<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h1>这是标题 1</h1>
<h2>这是标题 2</h2>
<p>这是段落</p>
<p class="no2">这个段落设置了内边距。</p>

<table>
    <tr>
        <td>123454</td>
    </tr>
        <tr>
        <td>123454</td>
    </tr>
        <tr>
        <td>123454</td>
    </tr>
</table>


<style type="text/css">

    body {
        background-image: url(img/img.jpg);
        background-attachment:fixed /* 背景不随页面滚动*/
        background-repeat: no-repeat;
        /*-webkit-background-size: 100% auto;*/
        /*-moz-background-size: 100% auto;*/
        background-size: 100% auto;
        /*background-position: 50px 0%; !* 定位可以 象素，百分比，center等关键字*!*/
        /*background-position: center;*/
        /*background-repeat: repeat-x; !* 是否横向重复放*!*/
        /*background-repeat: repeat-y;*/
    }
    h1 {background-color: #00ff00}
    h2 {background-color: transparent}
    p {
        background-color: rgb(250,0,255);
        margin:10px auto /*行间距 上下10 ，左右自动 */
    }

    p.no2 {background-color: gray; padding: 20px;}
    body table {
        background-image: url(img/img2.jpg);
    }
</style>
</body>
</html>